-- GENERATED SPELL FOR [North Fleet Marksman] --


function spell0_23946(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(38370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23946', 3000, 1)
end

function spell1_23946(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23946', 601, 1)
end

function spell2_23946(pUnit, Event) --@Volley,n/a--
pUnit:FullCastSpellOnTarget(30933,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23946', 6000, 1)
end

function Sorts_23946(pUnit, Event)
local choix_sorts_23946 = math.random(0, 2)
if choix_sorts_23946 == 0 then
pUnit:RegisterEvent('spell0_23946', 1, 1)
end
if choix_sorts_23946 == 1 then
pUnit:RegisterEvent('spell1_23946', 1, 1)
end
if choix_sorts_23946 == 2 then
pUnit:RegisterEvent('spell2_23946', 1, 1)
end
end

function mob23946_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23946', math.random(1500, 3000), 1)
end

function mob23946_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23946_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23946_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23946, 1, 'mob23946_Action')
RegisterUnitEvent(23946, 2, 'mob23946_Leave')
RegisterUnitEvent(23946, 3, 'mob23946_Kill')
RegisterUnitEvent(23946, 4, 'mob23946_Die')
